<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<?
session_start();
require_once 'utils/user.php';
require_once 'utils/archive.php';

ManageUser::doLogin();
$a = null;
$u = ManageArchive::doRead();
if (is_a($u, 'Archive')) $a=$u; else if ($u->pollMessageByCode(607)) 
        SessionMsg::pushMessage('This article doesn\'t exist. Do you want to creat it?', MSG_HEAD);
else
    Client::showUri('index.php');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
        <link rel="stylesheet" type="text/css" href="css/all.css"/>
    </head>
    <body>
        <?require_once 'page/header.php';?>
        <? if ($a) echo "<h2>{$a->getTitle()}</h2>created at {$a->getLastModified()} <a href='edit.php?n=".str_replace(' ', '_', $a->getTitle())."'>edit</a><hr/>{$a->getContent()}";?>
    </body>
</html>
